{layout name="layout/win" /}
<style>
.mf-td-split{display: inline-block !important;}
.nav-tabs li a{color:#3c8dbc}
.nav-tabs li.active{color:#555555}
</style>
    <div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本信息</a></li>
            <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">报备楼盘</a></li>
        </ul>
        
        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="home">
                <div class="row">
                    <div class="col col-xs-8">
                        <table class="table table-borderd">
                            <tr>
                                <td class="mf-td-title" style="width:100px">{:__('Customer_name')}:</td>
                                <td class="mf-td-input">{$row.customer_name|htmlentities}</td>
                                <td class="mf-td-title" style="width:120px">{:__('Customer_tel')}:</td>
                                <td class="mf-td-input">{$row.customer_tel|htmlentities}</td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Sex_radio')}:</td><td class="mf-td-input"> 
                                    <div class="radio">
                                        {$row.sex_radio}
                                    </div>
                                </td>
                                <td class="mf-td-title">{:__('Want_area')}:</td>
                                <td class="mf-td-input" style="position:relative">{$row.want_area|htmlentities}</td>
                            </tr>
                    
                            <tr>
                                <td class="mf-td-title">{:__('First_house')}:</td><td class="mf-td-input"> <div>
                                    {$row.first_house}
                                        </div></td>
                                        <td class="mf-td-title">{:__('Social_security')}:</td><td class="mf-td-input">{$row.social_security}</td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Payment_percentage')}:</td>
                                <td class="mf-td-input">{$row.payment_percentage|htmlentities}%</td>
                                <td class="mf-td-title">{:__('Payment_method')}:</td>
                                <td class="mf-td-input">
                                    <div>
                                        {$row.payment_method}
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">面积(平方米):</td>
                                <td class="mf-td-input">
                                    <div class="input-group">
                                        <div class="mf-td-split">{$row.want_acre_low|htmlentities}</div>
                                        <div class="mf-td-split">至</div>
                                        <div class="mf-td-split">{$row.want_acre_high|htmlentities}</div>
                                    </div>
                                </td>
                                <td class="mf-td-title">期望总价(万元):</td>
                                <td class="mf-td-input">
                                    <div class="input-group">
                                        <div class="mf-td-split">{$row.want_price_low|htmlentities}</div> 
                                        <div class="mf-td-split">至</div>
                                        <div class="mf-td-split">{$row.want_price_high|htmlentities}</div>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">期望楼层:</td>
                                <td class="mf-td-input">
                                    <div class="input-group">
                                        <div class="mf-td-split">{$row.want_floor_low}</div>
                                        <div class="mf-td-split">至</div>
                                        <div class="mf-td-split"> {$row.want_floor_high}</div>
                                    </div>
                                </td>
                                <td class="mf-td-title">客户来源:</td>
                                <td>{$row.customer_from}</td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Property_quantity')}:</td>
                                <td class="mf-td-input">{$row.property_quantity}</td>
                                <td class="mf-td-title">{:__('Marriage_radio')}:</td>
                                <td class="mf-td-input">
                                        {$row.marriage_radio}
                                </td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Mem')}:</td>
                                <td class="mf-td-input" colspan="3"> {$row.mem}</td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">报备楼盘:</td>
                                <td class="mf-td-input" colspan="3"> 
                                    {foreach name="buildings" item="vo" }
                                        <div class="mf-td-split"> {$vo.building_name} , </div>
                                    {/foreach}
                                </td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Account_statement')}:</td>
                                <td class="mf-td-input" colspan="3"> {$row.account_statement}</td>
                            </tr>
                            <tr>
                                <td class="mf-td-title">{:__('Credit_investigation')}:</td>
                                <td class="mf-td-input" colspan="3"> {$row.credit_investigation}</td>
                            </tr>
                        </table>
                    </div>
                    <div class="col col-xs-4">
                        <div class="panel panel-success">
                            <div class="panel-heading">跟进内容</div>
                            <div class="panel-body" style="height:220px">
                                <ul>
                                    <li>123</li>
                                </ul>
                            </div>
                        </div>
                        <div class="panel panel-success">
                            <div class="panel-heading">新增跟进</div>
                            <div class="panel-body">
                                <div class="radio">
                                    {foreach name="stateList" item="vo"}
                                    <label for="row[state]-{$key}"><input id="row[state]-{$key}" name="row[state]" type="radio" value="{$key}" {in name="key" value="无效"}checked{/in} /> {$vo}</label> 
                                    {/foreach}
                                </div>
                                <textarea name="contents" style="width:100%"></textarea>
                            </div>
                            <div class="panel-footer" style="height:40px"> <button type="button" id="btnFollow" data-customerid="{$customerid}" class="btn btn-success btn-xs pull-right">新增跟进</button></div>
                        </div>
                    </div>
                </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="profile">
                <script type="text/html" id="tplReportTableTr">
                    <tr><td>{{buildingname}}</td><td>{{time}}</td><td>未审核</td></tr>
                </script>
                <table class="table table-bordered" id="tblReportList">
                    <tr><th>楼盘名称</th><th>报备时间</th><th>审核状态</th></tr>
                    {volist name="report_list" id="vo"}
                    <tr><td>{$vo->newhousebuilding->building_name}</td><td>{$vo->createtime|date='y-m-d',###}</td><td>{$vo->verify_state}</td></tr>
                    {/volist}
                </table>
                <div class="panel panel-success">
                    <div class="panel-heading">新增报备</div>
                    <div class="panel-body">
                        <form class="form-horizontal" role="form">
                            <input type="hidden" name="row[customer_id]" value="{$customerid}" />
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">{:__('Building_id')}:</label>
                                <div class="col-xs-10 col-sm-8">
                                    <input id="c-building_id"  data-rule="required" data-source="building/buildingitemslist" data-primary-key="id" data-field="building_name" class="form-control selectpage" name="row[building_id]" type="text" value="">
                                </div>
                                <div class="col-xs-2 col-sm-2">
                                    &nbsp;
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-xs-12 col-sm-2">备注:</label>
                                <div class="col-xs-10 col-sm-8">
                                    <textarea data-rule="required" class="form-control" id="c-contents" placeholder="备注信息" name="row[contents]"></textarea>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="button"  id="btnNewReport" class="btn btn-default">新增报备</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>